
<?php
include_once 'index_dianji.php';
session_start();
$id = $_GET[id];
session_start();

$config = include_once '../public/config.php';
include_once '../public/function.php';
$result = aselect($config, 'wenzhang', $id);
// var_dump($result);
$pic                = $result[0][pic];
$result[0][content] = strip_tags($result[0][content]);

//第一步连接数据库服务器；
@mysql_connect('localhost', 'root', 'root');
//第二步判断是否正确连接；
if (mysql_errno()) {
    die(mysql_error());
}
//第三步选择数据库
mysql_select_db('blog');
//第四步设置字符集
mysql_set_charset('utf8');
//第五步写入SQL语句
$sql = "select * from pinglun where pid='$id'";
//第六步 发送SQL语句到MYSQL服务器
$res = mysql_query($sql);

//第七部处理结果集
$result1 = [];
while ($row = mysql_fetch_assoc($res)) {
    $result1[] = $row;
}
//第八步释放资源

?>

<!doctype html>
<html>
<head>
<meta charset="gb2312">
<title>个人博客模板（寻梦）</title>
<meta name="keywords" content="个人博客模板,博客模板" />
<meta name="description" content="寻梦主题的个人博客模板，优雅、稳重、大气,低调。" />
<link rel="stylesheet" href="./css/text.css"/>
<link href="css/base.css" rel="stylesheet">
<link href="css/index.css" rel="stylesheet">
<link rel="./css/text.css" href="">
<!-- 最新版本的 Bootstrap 核心 CSS 文件 -->
<link rel="stylesheet" href="https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">

<!-- 可选的 Bootstrap 主题文件（一般不用引入） -->
<link rel="stylesheet" href="https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap-theme.min.css" integrity="sha384-rHyoN1iRsVXV4nD0JutlnGaslCJuC7uwjduW9SVrLvRYooPp2bWYgmgJQIXwl/Sp" crossorigin="anonymous">

<!-- 最新的 Bootstrap 核心 JavaScript 文件 -->
<script src="https://cdn.bootcss.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
<!--[if lt IE 9]>
<script src="js/modernizr.js"></script>
<![endif]-->
</head>
<body>
<header>
  <div id=""><a href="/"></a></div>
  <nav class="topnav" id="topnav"><a href="index.php"><span>首页</span><span class="en">Protal</span></a><a href="about.php"><span>分类</span><span class="en">About</span></a><a href="message.php"><span>留言板</span><span class="en">Life</span></a><a href="moodlist.php"><span>说说</span><span class="en">Doing</span></a><a href="share.php"><span>访客</span><span class="en">Share</span></a><a href="knowledge.php"><span>关于我</span><span class="en">Learn</span></a><a href="../admin/admin/admin.php"><span>管理员</span><span class="en">administrator</span></a>

  </nav>

  </nav>
</header>
<div class="banner">
  <section class="box">
    <ul class="texts">
      <p>恰同学少年，东西散相见难</p>
      <p>对啊，你才二十多岁</p>
      <p>你不努力的二十岁，就是你举步维艰的三十岁</p>
    </ul>
    <div class="avatar"><a href="#"><span>尚家欢</span></a> </div>
  </section>
</div>
<div class="template">
  <div class="box">
    <h3>
      <p><span>个人博客</span>模板 Templates</p>
    </h3>
    <ul>
      <li><a href="/"  target="_blank"><img src="images/01.jpg"></a><span>仿新浪博客风格・梅――古典个人博客模板</span></li>
      <li><a href="/" target="_blank"><img src="images/02.jpg"></a><span>黑色质感时间轴html5个人博客模板</span></li>
      <li><a href="/"  target="_blank"><img src="images/03.jpg"></a><span>Green绿色小清新的夏天-个人博客模板</span></li>
      <li><a href="/" target="_blank"><img src="images/04.jpg"></a><span>女生清新个人博客网站模板</span></li>
      <li><a href="/"  target="_blank"><img src="images/02.jpg"></a><span>黑色质感时间轴html5个人博客模板</span></li>
      <li><a href="/"  target="_blank"><img src="images/03.jpg"></a><span>Green绿色小清新的夏天-个人博客模板</span></li>
    </ul>
  </div>
</div>
<article>
  <h2 class="title_tj">
    <p>文章<span>详情</span></p>
  </h2>

  <div class="box1" >

       <h4 class="title"><?php echo $result[0][title] ?></h4>
       <p class="title1">
       <span>发布时间：<?php echo $result[0][ctime] ?></span>
       <span> 作者：尚家欢</span>
       <span> 评论次数：12</span>
       </p>

        <!-- 文章内容输入框 -->
  <div class="center1">
         <div class="img"><img src="../admin/wenzhang/<?php echo $pic ?>" alt="" height="280px"  style:"margin-left：10px">

          </div>
        <textarea class="form-control col-md-3" rows="20">

          <?php echo $result[0][content] ?>
        </textarea>


        <form class="pinglun" action="dotext1.php" method="post">
              <!-- 加载编辑器的容器 -->
              <script id="baidu" name="liuyan"  type="text/plain" style="width: 670px;">
              </script>



                  <!-- Provides extra visual weight and identifies the primary action in a set of buttons -->


                <?php
$user = $_SESSION['name'];

if ($_SESSION['islogin'] != 1) {
    echo '<a class="btn btn-info" href="index.php">登录后可评论</a>';
} else {
    echo '<input type="submit" id="dl" class="btn btn-primary" value="发表评论">';
    echo '<a href="">欢迎小伙伴 ' . $user . ' </a>';

}
?>

                 <?php

foreach ($result1 as $v) {
    echo '<p class="p_massages">' . strip_tags($v['content']) . '</p>';

}

?>
<div class="fenye">
<nav aria-label="Page navigation">
  <ul class="pagination">
    <li>
      <a href="#" aria-label="Previous">
        <span aria-hidden="true">&laquo;</span>
      </a>
    </li>
    <li><a href="#">1</a></li>
    <li><a href="#">2</a></li>
    <li><a href="#">3</a></li>
    <li><a href="#">4</a></li>
    <li><a href="#">5</a></li>
    <li>
      <a href="#" aria-label="Next">
        <span aria-hidden="true">&raquo;</span>
      </a>
    </li>
  </ul>
</nav>

</div>





                   <!-- 本篇文章id-->
              <input  type="hidden" value="<?php echo $id; ?>" name="id">
              <input  type="hidden" value="<?php echo $user; ?>" name="user">


         </form>

        </div>
  </div>

  <aside class="right">


    <hr/>
    <h3>
      <p>最新<span>文章</span></p>
    </h3>
    <ul class="rank">

      <li><a href="/" title="免费收录网站搜索引擎登录口大全" target="_blank">免费收录网站搜索引擎登录口大全</a></li>
      <li><a href="/" title="做网站到底需要什么?" target="_blank">做网站到底需要什么?</a></li>
      <li><a href="/" title="企业做网站具体流程步骤" target="_blank">企业做网站具体流程步骤</a></li>
      <li><a href="/" title="建站流程篇――教你如何快速学会做网站" target="_blank">建站流程篇――教你如何快速学会做网站</a></li>
      <li><a href="/" title="box-shadow 阴影右下脚折边效果" target="_blank">box-shadow 阴影右下脚折边效果</a></li>
      <li><a href="/" title="打雷时室内、户外应该需要注意什么" target="_blank">打雷时室内、户外应该需要注意什么</a></li>
    </ul>
    <h3 class="ph">
      <p>点击<span>排行</span></p>
    </h3>
    <ul class="paih">
      <li><a href="/" title="Column 三栏布局 个人网站模板" target="_blank">Column 三栏布局 个人网站模板</a></li>
      <li><a href="/" title="withlove for you 个人网站模板" target="_blank">with love for you 个人网站模板</a></li>
      <li><a href="/" title="免费收录网站搜索引擎登录口大全" target="_blank">免费收录网站搜索引擎登录口大全</a></li>
      <li><a href="/" title="做网站到底需要什么?" target="_blank">做网站到底需要什么?</a></li>
      <li><a href="/" title="企业做网站具体流程步骤" target="_blank">企业做网站具体流程步骤</a></li>
    </ul>
    <h3 class="links">
      <p>友情<span>链接</span></p>
    </h3>
    <ul class="website">
      <li><a href="/">个人博客</a></li>
      <li><a href="/">尚家欢个人博客</a></li>
      <li><a href="/">多迪技术</a></li>
      <li><a href="/">简书</a></li>
    </ul>
    </div>
    <!-- Baidu Button BEGIN -->
    <div id="bdshare" class="bdshare_t bds_tools_32 get-codes-bdshare"><a class="bds_tsina"></a><a class="bds_qzone"></a><a class="bds_tqq"></a><a class="bds_renren"></a><span class="bds_more"></span><a class="shareCount"></a></div>
    <script type="text/javascript" id="bdshare_js" data="type=tools&amp;uid=6574585" ></script>
    <script type="text/javascript" id="bdshell_js"></script>
    <script type="text/javascript">
document.getElementById("bdshell_js").src = "http://bdimg.share.baidu.com/static/js/shell_v2.js?cdnversion=" + Math.ceil(new Date()/3600000)
</script>
    <!-- Baidu Button END -->
    <a href="/" class="weixin"> </a></aside>
</article>
<footer>
  <p>Design by DanceSmile <a href="http://www.miitbeian.gov.cn/" target="_blank">蜀ICP备11002373号-1</a> <a href="/">网站统计</a></p>
</footer>
<script src="js/silder.js"></script>
<!--   -->
<!-- 配置文件 -->
                    <script type="text/javascript" src="../public/baidu/ueditor.config.js"></script>
                    <!-- 编辑器源码文件 -->
                    <script type="text/javascript" src="../public/baidu/ueditor.all.js"></script>
                    <!-- 实例化编辑器 -->
                    <script type="text/javascript">
                        var ue = UE.getEditor('baidu',{
                          toolbars: [
                          ['emotion']
                            ]
                        });
                    </script>
</body>


</html>
